%%=====================================================================================
%%
%%         File:  bash-support.tex
%%
%%  Description:  bash-support.vim : Key mappings for Vim without GUI.
%%                
%%       Author:  Dr.-Ing. Fritz Mehner
%%        Email:  mehner@fh-swf.de
%%    Copyright:  Copyright (C)  2003-2010  Dr.-Ing. Fritz Mehner  (mehner@fh-swf.de)
%%      Version:  see PluginVersion (below)
%%     Revision:  $Id: bash-hot-keys.tex,v 1.40 2012/06/01 07:47:06 mehner Exp $
%%      Created:  09.06.2003
%%                
%%        Notes:  
%%                
%%=====================================================================================

\newcommand{\PluginVersion}{3.10}
\newcommand{\ReleaseDate}{\today}
\newcommand{\Rep}{{\scriptsize{[n]}}}

\documentclass[oneside,11pt,a4paper,DIV18]{scrartcl}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}

\setlength\parindent{0pt}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{setspace}

%%----------------------------------------------------------------------
%%  luximono : Type1-font
%%  Makes keyword stand out by using semibold letters.
%%----------------------------------------------------------------------
\usepackage[scaled]{luximono}

%%----------------------------------------------------------------------
%%  fancyhdr
%%----------------------------------------------------------------------
\pagestyle{fancyplain}
\fancyhf{}
\fancyfoot[L]{\small \ReleaseDate}
\fancyfoot[C]{\small bash-support.vim}
\fancyfoot[R]{\small \textbf{Page \thepage{} / \pageref{LastPage}}}
\renewcommand{\headrulewidth}{0.0pt}

%%----------------------------------------------------------------------
%%  hyperref
%%----------------------------------------------------------------------
\usepackage[ps2pdf]{hyperref}
\hypersetup{pdfauthor={Dr.-Ing. Fritz Mehner, FH Südwestfalen, Iserlohn, Germany}}
\hypersetup{pdfkeywords={Vim, Bash}}
\hypersetup{pdfsubject={Vim-plugin,  bash-support.vim, hot keys}}
\hypersetup{pdftitle={Vim-plugin,  bash-support.vim, hot keys}}

\twocolumn

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  START OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

%%======================================================================
%%  title
%%======================================================================
\begin{center}
\textbf{\textsc{\small{Vim-Plugin}}}\\
\textbf{\LARGE{bash-support.vim}}\\
\textbf{\textsc{\small{Version \PluginVersion}}}\\
\vspace{3mm}%
\textbf{\textsc{\huge{Hot keys}}}\\ 
\vspace{3mm}%
\footnotesize{Key mappings for Vim and gVim.}\\
%\vspace{1mm}%
\footnotesize{Plugin: http://vim.sourceforge.net}\\
\footnotesize{Fritz Mehner (mehner@fh-swf.de)}\\
{\normalsize (i)} insert mode, {\normalsize (n)} normal mode, {\normalsize (v)} visual mode\\
%\footnotesize{\ReleaseDate}\\
\vspace{3.5mm}
\small
%%======================================================================
%%  table, left part
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{59mm}|}
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{C}omments}}\\
\hline \Rep\verb'\cl'  & end-of-line comment              \hfill (n, i, v)\\
\hline \Rep\verb'\cj'  & adjust end-of-line comments      \hfill (n, i, v)\\
\hline     \verb'\cs'  & set end-of-line comment column   \hfill (n)\\
\hline     \verb'\cfr' & frame comment                    \hfill (n, i)\\
\hline     \verb'\cfu' & function description             \hfill (n, i)\\
\hline     \verb'\ch'  & file header                      \hfill (n, i)\\
\hline     \verb'\ckb' & keyword \verb'BUG    '           \hfill (n, i)\\
\hline     \verb'\ckt' & keyword \verb'TODO   '           \hfill (n, i)\\
\hline     \verb'\ckr' & keyword \verb'TRICKY '           \hfill (n, i)\\
\hline     \verb'\ckw' & keyword \verb'WARNING'           \hfill (n, i)\\
\hline     \verb'\ckn' & keyword: new keyword             \hfill (n, i)\\
\hline \Rep\verb'\cc'  & toggle comment                   \hfill (n, i, v)\\
\hline     \verb'\cd'  & date                             \hfill (n, i, v)\\
\hline     \verb'\ct'  & date \& time                     \hfill (n, i, v)\\
\hline     \verb'\ce'  & \verb'echo "<line>"'             \hfill (n, i)\\
\hline     \verb'\cr'  & remove \verb'echo'               \hfill (n, i)\\
\hline     \verb'\css' & script sections\hspace{11mm}\footnotesize{(tab compl.)}       \hfill \normalsize{(n,i)}\\
\hline     \verb'\ckc' & keyword comment\hspace{5mm}\footnotesize{(tab compl.)}         \hfill \normalsize{(n,i)}\\
\hline     \verb'\cv'  & vim modeline                     \hfill (n, i)\\
\hline 
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{S}tatements}}\\
\hline \verb'\sc'  & \verb'case in ... esac'               \hfill (n, i)\\
\hline \verb'\sei' & \verb'elif then'                      \hfill (n, i)\\
\hline \verb'\sf'  & \verb'for in do done'                 \hfill (n, i, v)\\
\hline \verb'\sfo' & \verb'for ((...)) do done'            \hfill (n, i, v)\\
\hline \verb'\si'  & \verb'if then fi'                     \hfill (n, i, v)\\
\hline \verb'\sie' & \verb'if then else fi'                \hfill (n, i, v)\\
\hline \verb'\ss'  & \verb'select in do done'              \hfill (n, i, v)\\
\hline \verb'\su'  & \verb'until do done'                  \hfill (n, i, v)\\
\hline \verb'\sw'  & \verb'while do done'                  \hfill (n, i, v)\\
\hline \verb'\sfu' & \verb'function'                       \hfill (n, i, v)\\
\hline \verb'\se'  & \verb'echo -e ""'                     \hfill (n, i, v)\\
\hline \verb'\sp'  & \verb'printf  "%s"'                   \hfill (n, i, v)\\
\hline \verb'\sa'  & array element\ \ \ \verb'${.[.]}'     \hfill (n, i, v)\\
\hline \verb'\saa' & arr. elem.s (all) \ \verb'${.[@]}'    \hfill (n, i, v)\\
\hline \verb'\sa1' & arr. elem.s (1 word) \ \verb'${.[*]}' \hfill (n, i, v)\\
\hline \verb'\ssa' & subarray \ \verb'${.[@]::}'           \hfill (n, i, v)\\
\hline \verb'\san' & no. of arr. elem.s \ \verb'${.[@]}'   \hfill (n, i, v)\\
\hline \verb'\sai' & list of indices \ \verb'${.[*]}'      \hfill (n, i, v)\\
\hline
%%----------------------------------------------------------------------
%%  test
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{T}est}}\\
\hline \verb'\t1'  &  unary operator, 1 arg.: \verb'[ -  ]'         \hfill (n, i)\\
\hline \verb'\t2'  &  binary operator, 2 arg.: \verb'[  -  ]'        \hfill (n, i)\\
\hline
\end{tabular}\\
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
\begin{minipage}[b]{75mm}%
\scriptsize{%
\vspace{10mm}
\hrulefill\\
$^1$ {system-wide installation only}\\
$^2$ {Linux/U**x only}
}%
\end{minipage}\\
%

\newpage 
%%======================================================================
%%  table, right part
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{59mm}|}
%%----------------------------------------------------------------------
%%  menu Regular Expression
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{Regular E\textbf{x}pressions}}\\
\hline \verb'\xm' & match: \verb'[[ =~ ]] '         \hfill (n, i)\\
\hline
%%----------------------------------------------------------------------
%%  menu Posix character classes
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{P}OSIX Character Classes}}\\
\hline \verb'\pan' &  \verb'[:alnum:]'         \hfill (n, i)\\
\hline \verb'\pal' &  \verb'[:alpha:]'         \hfill (n, i)\\
\hline \verb'\pas' &  \verb'[:ascii:]'         \hfill (n, i)\\
\hline \verb'\pb'  &  \verb'[:blank:]'         \hfill (n, i)\\
\hline \verb'\pc'  &  \verb'[:cntrl:]'         \hfill (n, i)\\
\hline \verb'\pd'  &  \verb'[:digit:]'         \hfill (n, i)\\
\hline \verb'\pg'  &  \verb'[:graph:]'         \hfill (n, i)\\
\hline \verb'\pl'  &  \verb'[:lower:]'         \hfill (n, i)\\
\hline \verb'\ppr' &  \verb'[:print:]'         \hfill (n, i)\\
\hline \verb'\ppu' &  \verb'[:punct:]'         \hfill (n, i)\\
\hline \verb'\ps'  &  \verb'[:space:]'         \hfill (n, i)\\
\hline \verb'\pu'  &  \verb'[:upper:]'         \hfill (n, i)\\
\hline \verb'\pw'  &  \verb'[:word:]'          \hfill (n, i)\\
\hline \verb'\px'  &  \verb'[:xdigit:]'        \hfill (n, i)\\
\hline
\hline
\multicolumn{2}{|r|}{\textsl{S\textbf{n}ippets}}\\
\hline \verb'\nr'  & read code snippet          \hfill (n, i)\\
\hline \verb'\nw'  & write code snippet         \hfill (n, v, i)\\
\hline \verb'\ne'  & edit code snippet          \hfill (n, i)\\
%
\hline \verb'\ntl' & edit local templates      \hfill (n, i)\\
\hline \verb'\ntg' & edit global templates $^1$\hfill (n, i)\\
\hline \verb'\ntr' & reread the templates      \hfill (n, i)\\
\hline \verb'\nts' & switch template style     \hfill (n, i)\\
\hline
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{R}un}}\\
\hline \verb'\rr'  & update file, run script           \hfill (n, i, v$^2$)\\
\hline \verb'\ra'  & set script command line arguments \hfill (n, i)\\
\hline \verb'\rc'  & update file, check syntax         \hfill (n, i)\\
\hline \verb'\rco' & syntax check options              \hfill (n, i)\\
\hline \verb'\rd'  & start debugger$^2$                \hfill (n, i)\\
\hline \verb'\re'  & make script executable$^2$        \hfill (n, i)\\
\hline \verb'\rba' & set Bash command line arguments   \hfill (n, i)\\
\hline \verb'\rh'  & hardcopy buffer                   \hfill (n, i, v)\\
\hline \verb'\rs'  & settings and hotkeys              \hfill (n, i)\\
\hline \verb'\rt'  & set xterm size$^2$                \hfill (n, i, GUI only)\\
\hline \verb'\ro'  & change output destination         \hfill (n, i)\\
\hline
\hline 
\multicolumn{2}{|r|}{\textsl{\textbf{H}elp}}\\
\hline \verb'\hb'  & Bash manual                     \hfill (n, i)\\
\hline \verb'\hh'  & help (Bash builtins)            \hfill (n, i)\\
\hline \verb'\hm'  & manual (command line utilities) \hfill (n, i)\\
\hline \verb'\hbs' & Bash-support plugin             \hfill (n, i)\\
\hline 
\hline
\multicolumn{2}{|r|}{\textsl{Menu(s)}}\\
\hline \verb'\lbs'  & load    menus\hfill \scriptsize{(n \& GUI only)}\\
\hline \verb'\ubs'  & unload  menus\hfill \scriptsize{(n \& GUI only)}\\
\hline 
\end{tabular}\\%
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%\vspace{1mm}%
%
\begin{minipage}[b]{70mm}%
\setlength{\fboxsep}{.25mm}%
%%----------------------------------------------------------------------
%%  Additional Mappings
%%----------------------------------------------------------------------
\begin{spacing}{1.1}%
\begin{tabular}[]{|p{11mm}|p{55mm}|}%
\hline
\multicolumn{2}{|r|}{\textsl{Additional Mappings}}\\
\hline
\hline \textbf{typing}& \textbf{expansion}\\
\hline \verb"''"      & single quotes around a WORD    \hfill (n)\\
\hline \verb'""'      & double quotes around a WORD    \hfill (n)\\
\hline
\end{tabular}
\end{spacing}
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
\end{minipage}%
%
\end{center}
\end{document}
